﻿<%@ Page Title="季度统计" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="True" CodeBehind="QuarterStatistics.aspx.cs" Inherits="Hospital_QuarterStatistics" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>

<%@ Register src="../Common/ChartControl.ascx" tagname="ChartControl" tagprefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

     <script language="javascript" type="text/javascript">
         function txtClear() {
             var txtBox = document.getElementsByTagName("input")
             for (var i = 0; i < txtBox.length; i++) {
                 if (txtBox[i].type == "text") {
                     txtBox[i].value = "";
                 }
             }
             document.getElementById("ctl00_ContentPlaceHolder1_ddlQualityLevel").selectedIndex = 0;
             document.getElementById("ctl00_ContentPlaceHolder1_ddlInsuranceType").selectedIndex = 0;
             document.getElementById("ctl00_ContentPlaceHolder1_ddlSortName").selectedIndex = 0;
             document.getElementById("ctl00_ContentPlaceHolder1_ddlLevels").selectedIndex = 0;
         }
function Button1_onclick() {

}
</script>
 <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="tabcontent">
     <uc1:QueryControl ID="QueryControl1" runat="server"  />
        <%--<asp:Panel ID="pnlQuery" runat="server">
            <table class="querylist">
                <tr>
                    <td>
                        <table class="querylist">
                            <tr>
                                <td align="right">
                                    生产企业名称：
                                </td>
                                <td align="left">
                                    <input id="txtCompanyName_SC" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    通用名：
                                </td>
                                <td align="left">
                                    <input id="txtProductName" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    剂型：
                                </td>
                                <td align="left">
                                    <input id="txtMedicineModelName" type="text" runat="server" style="width: 100px" />
                                </td>
                            </tr>
                            <asp:Literal ID="ltlAdvance" runat="server" Text="&lt;tbody id='simple' &gt;"></asp:Literal>
                            <tr>
                                <td align="right">
                                    规格：
                                </td>
                                <td align="left">
                                    <input id="txtOutlookc" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    商品名：
                                </td>
                                <td align="left">
                                    <input id="txtGoodsName" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    单位：
                                </td>
                                <td align="left">
                                    <input id="txtUnit" type="text" runat="server" style="width: 100px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    分类：
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlSortName" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td align="right">
                                    包装：
                                </td>
                                <td align="left">
                                    <input id="txtPack" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    质量层次：
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlQualityLevel" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    药品编号：
                                </td>
                                <td align="left">
                                    <input id="txtProcureCatalogID" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    医院编号：
                                </td>
                                <td align="left">
                                    <input id="txtHospitalId" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    医院名称：
                                </td>
                                <td align="left">
                                    <input id="txtHospitalName" type="text" runat="server" style="width: 100px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    中标企业名称：
                                </td>
                                <td align="left">
                                    <input id="txtCompanyName_TB" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    配送企业编号：
                                </td>
                                <td align="left">
                                    <input id="txtCompanyID_PS" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    配送企业名称：
                                </td>
                                <td align="left">
                                    <input id="txtCompanyName_PS" type="text" runat="server" style="width: 100px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    采购单名称：
                                </td>
                                <td align="left">
                                    <input id="txtOrderName" type="text" runat="server" style="width: 100px" />
                                </td>
                                <td align="right">
                                    采购单开始时间：
                                </td>
                                <td align="left">
                                    <input id="txtStartTimeFrom" type="text" runat="server" style="width: 70px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
                                    -<input id="txtStartTimeTo" type="text" runat="server" style="width: 70px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
                                </td>
                                <td align="right">
                                    医保类型：
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlInsuranceType" runat="server" Width="89px">
                                        <asp:ListItem Selected="True" Value="">全部</asp:ListItem>
                                        <asp:ListItem>甲类</asp:ListItem>
                                        <asp:ListItem>乙类</asp:ListItem>
                                        <asp:ListItem>民族药</asp:ListItem>
                                        <asp:ListItem>医保</asp:ListItem>
                                        <asp:ListItem>非医保</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    医院级别：
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlLevels" runat="server">
                                        <asp:ListItem Selected="True" Value="">全部</asp:ListItem>
                                        <asp:ListItem>三甲</asp:ListItem>
                                        <asp:ListItem>三乙</asp:ListItem>
                                        <asp:ListItem>二甲</asp:ListItem>
                                        <asp:ListItem>二乙</asp:ListItem>
                                        <asp:ListItem>一甲</asp:ListItem>
                                        <asp:ListItem>一乙</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                
                                <td align="right">
                                    排序方式：
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlFiled" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDirection" runat="server">
                                        <asp:ListItem Selected="True" Value="ASC">升序</asp:ListItem>
                                        <asp:ListItem Value="DESC">降序</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="140px" valign="middle">
                        <br />
                        <asp:Button ID="btnQuery" runat="server" Text="查询" CssClass="btn"
                            Width="45px" onclick="btnQuery_Click" />
                        <asp:LinkButton ID="lbnSwitch" runat="server" CommandArgument="advance"
                            Text="简单查询" onclick="lbnSwitch_Click"></asp:LinkButton>
                        <br />
                        <br />
                        <input id="Button1" type="button" value="清空数据" onclick="txtClear()" class="btn" style="width: 100px" onclick="return Button1_onclick()" />
                        <%--                    <asp:Button ID="btnClear" runat="server" Text="清空查询条件" CssClass="btn" OnClick="btnClear_Click"
                        Width="95px" />--%>
                   <%-- </td>
                </tr>
            </table>
        </asp:Panel>--%>
    </div>
    <div>
       <asp:GridView ID="gvwInfo" runat="server" AutoGenerateColumns="false" 
                  CssClass="mainlist" onrowcommand="gvwInfo_RowCommand">
            <Columns>
               <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
               <asp:BoundField HeaderText="季度" DataField="PurchaseTimeQuarter" />
               <asp:BoundField HeaderText="采购总量" DataField="PurchaseCountTotal" />
               <asp:BoundField HeaderText="采购总金额" DataField="PurchaseAmountTotal" />
               <asp:BoundField HeaderText="入库总量" DataField="PurchaseAmountTotal" />
               <asp:BoundField HeaderText="入库总金额" DataField="PurchaseAmountTotal" />
               <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkHospital" runat="server" Text="医院详情统计"
                        CommandName="Hospital" CommandArgument='<%#Eval("PurchaseTimeQuarter")%>' ></asp:LinkButton>
                        |
                        <asp:LinkButton ID="LinkCompany" runat="server" Text="企业详情统计"
                        CommandName="Company" CommandArgument='<%#Eval("PurchaseTimeQuarter")%>' ></asp:LinkButton>
                        |
                        <asp:LinkButton ID="LinkDrugs" runat="server" Text="药品详情统计"
                        CommandName="Drugs" CommandArgument='<%#Eval("PurchaseTimeQuarter")%>' ></asp:LinkButton>
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="其它">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" 
                             onselectedindexchanged="ddlOther_SelectedIndexChanged" 
                            DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
                         </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
       </asp:GridView>
   </div>
   <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" onpagechanged="AspNetPager1_PageChanged1"
            >
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
        <asp:LinkButton ID="lbtnSee" runat="server" onclick="lbtnSee_Click" 
                Font-Size="Small"  Visible="false">显示图表</asp:LinkButton>
            <uc2:ChartControl ID="ChartControl1" runat="server" Visible ="false" />
            <li>说明:<span>可以点击相应按钮进入查看详细信息</span></li>
        </ul>
    </div>
</asp:Content>

